import { operateLogMock } from './data'
export default [
  {
    url: RegExp('/system/operate-log/page' + '.*'), // 查询分页列表
    method: 'get',
    response: params => {
      return {
        code: 200,
        status: true,
        msg: '成功！',
        data: getListByPage(params)
      }
    }
  },
  {
    url: RegExp('/system/operate-log/export' + '.*'), // 导出
    method: 'get',
    response: params => {
      return {
        code: 200,
        status: true,
        msg: '成功！',
        data: getListByExport(params)
      }
    }
  }
]

const getListByPage = params => {
  let result = operateLogMock(params.query.pageSize)
  return {
    list: result,
    total: 400
  }
}

const getListByExport = params => {
  let result = operateLogMock(params.query.pageSize)
  return result
}
